package com.thinkgsp.sys.model;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

@Deprecated
public class SysUserInvAdd extends SysModel {

	private static final long serialVersionUID = -5319601243631650145L;

	private Integer id;
	private Integer userId;
	private Integer invaddId;
	private Boolean defaultInvAdd;
	
	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the userId
	 */
	public Integer getUserId() {
		return userId;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	/**
	 * @return the invaddId
	 */
	public Integer getInvaddId() {
		return invaddId;
	}

	/**
	 * @param invaddId the invaddId to set
	 */
	public void setInvaddId(Integer invaddId) {
		this.invaddId = invaddId;
	}

	/**
	 * 默认当前库房
	 * @return the defaultInvAdd
	 */
	public Boolean getDefaultInvAdd() {
		return defaultInvAdd;
	}

	/**
	 * @param defaultInvAdd the defaultInvAdd to set
	 */
	public void setDefaultInvAdd(Boolean defaultInvAdd) {
		this.defaultInvAdd = defaultInvAdd;
	}

	@Override
	public String toString() {
		ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE);
		sb.append("id",this.id)
		  .append("userId",this.userId)
		  .append("invaddId",this.invaddId);
		
		return sb.toString();
	}

	@Override
	public boolean equals(Object o) {
		if(this == o) {
			return true;
		}
		if(!(o instanceof SysUserInvAdd)) {
			return false;
		}
		final SysUserInvAdd ui = (SysUserInvAdd)o;
		if(id != null) {
			return id.equals(ui.getId());
		} else {
			return (userId.equals(ui.getUserId()) && invaddId.equals(ui.getInvaddId()));
		}
	}

	@Override
	public int hashCode() {
		return (this.id != null ? this.id.hashCode() : 0);
	}

}
